import Skeleton from './Skeleton'
import Slider from './Slider'
import More from './More'
// 面包屑
import Bread from './Bread'
import BreadItem from './Bread/item.vue'
import InfiniteLoad from './InfiniteLoad'
import City from './City'
import Sku from './Sku'
// 加减数量
import Numbox from './Numbox'
// 加入购物车 按钮
import Button from './Button'
import CheckBox from './CheckBox'
import Message from './Message/index.vue'

const cpn = [
  Skeleton,
  Slider,
  More,
  Bread,
  BreadItem,
  InfiniteLoad,
  City,
  Sku,
  Numbox,
  Button,
  CheckBox,
  Message
]
export default {
  // vue2 第一个参数是Vue（构造函数）| vue3 拿到的是app实例
  install (app) {
    // console.log(app)
    // 注册全局组件
    // app.component(Skeleton.name, Skeleton)
    cpn.forEach(ps => {
      app.component(ps.name, ps)
    })
  }
}
